import request from '@/utils/request'

export function getApprovalList (data) {
  return request({
    url: `/user/process/instance/${data.page}/${data.pageSize}`,
    method: 'put',
    data
  })
}
/**
 * 
 * 
 * 更新审批状态
 * 
 */
export function process (id, statu, applyTime, username, state) {
  return request({
    url: `user/process/${id}`,
    params: { statu, applyTime, username, state }
  })
}


/**
 * 发起审批
 * 
 */
export function applicate (name) {
  return request({
    url: `user/process/applicate`,
    method: 'post',
    data: { name }
  })
}